Row

Zeitreihe 2000 bis 2020

Row

Dokumentation

Run download Deploy dashboard Last_pull Valdidate

Das Bundesamt für Statistik stellt wöchentlich erfasste Todesfallzahlen zur Verfügung.

Todesfälle nach Fünf-Jahres-Altersgruppe, Geschlecht, Woche und Kanton (CSV-Datei) - opendata.swiss

Die Todesfälle werden täglich den Zivilstandsämtern gemeldet und dem BFS im Rahmen der Statistik der natürlichen Bevölkerungsbewegung (BEVNAT) mitgeteilt. Der Melde- und Verarbeitungsprozess dauert in der Regel neun Tage.

Die Referenzbevölkerung ist die ständige Wohnbevölkerung, d.h. die Personen mit ständigem Wohnsitz in der Schweiz. Todesfälle von Personen mit Wohnsitz in der Schweiz, die sich im Ausland ereignet haben, werden gezählt.

Weitere Informationen :

Todesfälle Schweiz (Sample)

Todesfälle nach Fünf-Jahres-Altersgruppe, Geschlecht, Woche und Kanton (CSV-Datei)

TIME_PERIOD GEO AGE SEX Obs_status Obs_value
2020-W12 CH _T T P 1526
2020-W13 CH _T T P 1618
2020-W14 CH _T T P 1873
2020-W15 CH _T T P 1642
2020-W16 CH _T T P 1568
2020-W43 CH _T T P 1452
2020-W44 CH _T T P 1615
2020-W45 CH _T T P 1965
2020-W46 CH _T T P 1935
2020-W47 CH _T T P 1802

Wöchentlicher Nachtrag (Sample)

Logdatei

Datum Status Text
2020-12-05 03:29:53 I END API
2020-12-05 03:29:53 I badge auf disc
2020-12-05 03:29:53 I restful auf disc
2020-12-05 03:29:53 I START API
2020-12-05 03:29:53 I END Validierung
2020-12-05 03:29:53 I badge created
2020-12-05 03:29:53 I ../data/new_todesfaelle_woche.csv umbenannt in ../data/todesfaelle_woche.csv
2020-12-05 03:29:53 I ../data/todesfaelle_woche.csv umbenannt in ../data/arc_todesfaelle_woche.csv
2020-12-05 03:29:53 I ..in ../data/diff.csv geschrieben !
2020-12-05 03:29:53 I Differenzen in 948 Zeilen mit 4110 Todesfällen ..
2020-12-05 03:29:53 W ..2020-W47 mit 1802 Todesfälle
2020-12-05 03:29:53 W ..2020-W46 mit 1935 Todesfälle
2020-12-05 03:29:53 I ..2020-W45 mit 214 Todesfälle
2020-12-05 03:29:53 I ..2020-W44 mit 43 Todesfälle
2020-12-05 03:29:53 I ..2020-W43 mit 16 Todesfälle
2020-12-05 03:29:53 I ..2020-W42 mit 11 Todesfälle
2020-12-05 03:29:53 I ..2020-W41 mit 15 Todesfälle
2020-12-05 03:29:53 I ..2020-W40 mit 7 Todesfälle
2020-12-05 03:29:53 W ..2020-W30 mit -1 Todesfälle
2020-12-05 03:29:53 W ..2020-W11 mit -1 Todesfälle
2020-12-05 03:29:53 W ..2020-W07 mit -1 Todesfälle
2020-12-05 03:29:53 W ..2020-W03 mit -1 Todesfälle
2020-12-05 03:29:53 I ..2020 mit 4109 Todesfälle
2020-12-05 03:29:53 I Validatortabellen erstellt …
2020-12-05 03:29:53 I Referenztabellen erstellt …
2020-12-05 03:29:53 I new_todesfaelle_woche.csv gelesen 31931 Zeilen und 9 Spalten
2020-12-05 03:29:53 I todesfaelle_woche.csv gelesen 30488 Zeilen und 9 Spalten
2020-12-05 03:29:52 I START Validierung
2020-12-05 03:29:52 I END Download
2020-12-05 03:29:52 I badge created
2020-12-05 03:29:52 I ..CSV in new_todesfaelle_woche.csv geschrieben !
2020-12-05 03:29:50 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-05 03:29:50 I URL download lesen …
2020-12-05 03:29:50 I ..API in api.csv geschrieben !
2020-12-05 03:29:50 I . Deaths per week by 5-year age group, sex and canton (CSV file) vom 2020-12-01T21:06:51.538548
2020-12-05 03:29:47 I Opendata spec lesen …
2020-12-05 03:29:47 I START Download
2020-12-04 03:29:25 I END Download
2020-12-04 03:29:25 I END Download
2020-12-04 03:29:25 I badge created
2020-12-04 03:29:25 E Error Argument ‘url’ must be string.
2020-12-04 03:29:25 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-04 03:29:25 I URL download lesen …
2020-12-04 03:29:25 W Warning Unknown or uninitialised column: id.
2020-12-04 03:29:23 I Opendata spec lesen …
2020-12-04 03:29:23 I START Download
2020-12-04 03:29:25 I END Download
2020-12-04 03:29:25 I badge created
2020-12-04 03:29:25 E Error Argument ‘url’ must be string.
2020-12-04 03:29:25 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-04 03:29:25 I URL download lesen …
2020-12-04 03:29:25 W Warning Unknown or uninitialised column: id.
2020-12-04 03:29:23 I Opendata spec lesen …
2020-12-04 03:29:23 I START Download
2020-12-03 03:28:36 I END Download
2020-12-03 03:28:36 I END Download
2020-12-03 03:28:36 I badge created
2020-12-03 03:28:36 E Error Argument ‘url’ must be string.
2020-12-03 03:28:36 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-03 03:28:36 I URL download lesen …
2020-12-03 03:28:36 W Warning Unknown or uninitialised column: id.
2020-12-03 03:28:35 I Opendata spec lesen …
2020-12-03 03:28:35 I START Download
2020-12-03 03:28:36 I END Download
2020-12-03 03:28:36 I badge created
2020-12-03 03:28:36 E Error Argument ‘url’ must be string.
2020-12-03 03:28:36 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-03 03:28:36 I URL download lesen …
2020-12-03 03:28:36 W Warning Unknown or uninitialised column: id.
2020-12-03 03:28:35 I Opendata spec lesen …
2020-12-03 03:28:35 I START Download
2020-12-02 03:28:33 I END Download
2020-12-02 03:28:33 I END Download
2020-12-02 03:28:33 I badge created
2020-12-02 03:28:33 E Error Argument ‘url’ must be string.
2020-12-02 03:28:33 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-02 03:28:33 I URL download lesen …
2020-12-02 03:28:33 W Warning Unknown or uninitialised column: id.
2020-12-02 03:28:31 I Opendata spec lesen …
2020-12-02 03:28:31 I START Download
2020-12-02 03:28:33 I END Download
2020-12-02 03:28:33 I badge created
2020-12-02 03:28:33 E Error Argument ‘url’ must be string.
2020-12-02 03:28:33 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-02 03:28:33 I URL download lesen …
2020-12-02 03:28:33 W Warning Unknown or uninitialised column: id.
2020-12-02 03:28:31 I Opendata spec lesen …
2020-12-02 03:28:31 I START Download
2020-12-01 03:28:42 I END Download
2020-12-01 03:28:42 I END Download
2020-12-01 03:28:42 I badge created
2020-12-01 03:28:42 E Error Argument ‘url’ must be string.
2020-12-01 03:28:42 W ..new_todesfaelle_woche.csv wird überschrieben !
2020-12-01 03:28:42 I URL download lesen …
2020-12-01 03:28:42 W Warning Unknown or uninitialised column: id.
2020-12-01 03:28:41 I Opendata spec lesen …
2020-12-01 03:28:40 I START Download
2020-12-01 03:28:42 I END Download
2020-12-01 03:28:42 I badge created
2020-12-01 03:28:42 E Error Argument ‘url’ must be string.

Zusätzliche Informationen

Metadatenzugriff API (JSON)


Deaths per week by 5-year age group, sex and canton (CSV file) download
- created : 2020-12-01T21:06:51.538548
- format : CSV
- start_date : 2019-12-30T01:00:00
- end_date : 2020-11-22T01:00:00

Difference between downloads download
- created : 2020-12-05 03:29:53
- format : CSV
- start_date : 2017-W22
- end_date : 2020-W47

---
title: "Mortalitätsmonitoring Schweiz"
knit: (function(input_file, encoding) {
  out_dir <- '_book';
  if (!dir.exists(out_dir)) dir.create(out_dir);
  rmarkdown::render(input_file,
  encoding=encoding,
  output_file=file.path(dirname(input_file), out_dir, 'index.html'))})
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
---

```{r setup, include=FALSE}
library(dygraphs) # needs xts
library(dplyr)
library(readr)
source('../R/badgelinks.R')
source('berestful.R')

```

Row
---------------------------------------------------

### Zeitreihe 2000 bis 2020

```{r graph}
# read data with dyfun and convert to timeseries
source('momodyfun.R')
# select sorted timeseries by canton
ktlist <- c('CH','ZH','BE','VD','TI')

dft1 <- dyfun(quos(kanton %in% ktlist))  %>%
  count(kt,date, wt=value, name='value') %>%
  split(.$kt)
dft2 <- dft1[ktlist] # sort the list
tslist <- lapply(dft2, function(x) {
  xts::xts(x$value, order.by = x$date)
  })
tss <- do.call(cbind,tslist)
dygraph(tss, main = "Todesfälle Schweiz") %>% 
  dyOptions(stepPlot = T) %>%
  dyHighlight(highlightCircleSize = 5, 
              highlightSeriesBackgroundAlpha = 0.2,
              hideOnMouseOut = FALSE) %>% 
  dyRangeSelector(dateWindow = c("2013-07-01", as.character(last(dft1[[1]]$date)))) %>%
  dyEvent("2020-3-17", "Lockdown", labelLoc = "bottom")
```


Row {.tabset .tabset-fade}
---------------------------------------------------

### Dokumentation

`r badge`

**Das Bundesamt für Statistik stellt wöchentlich erfasste Todesfallzahlen zur Verfügung.**

Todesfälle nach Fünf-Jahres-Altersgruppe, Geschlecht, Woche und Kanton (CSV-Datei) - [opendata.swiss](https://opendata.swiss/de/dataset?q=%22Todesfälle+nach+Fünf-Jahres-Altersgruppe%22+Kanton)

Die Todesfälle werden täglich den Zivilstandsämtern gemeldet und dem BFS im Rahmen der Statistik der natürlichen Bevölkerungsbewegung (BEVNAT) mitgeteilt. Der Melde- und Verarbeitungsprozess dauert in der Regel neun Tage.

Die Referenzbevölkerung ist die ständige Wohnbevölkerung, d.h. die Personen mit ständigem Wohnsitz in der Schweiz. Todesfälle von Personen mit Wohnsitz in der Schweiz, die sich im Ausland ereignet haben, werden gezählt.

Weitere Informationen :

- Bundesamt für Statistik:  [Todesfälle](https://www.bfs.admin.ch/bfs/de/home/statistiken/bevoelkerung/geburten-todesfaelle/todesfaelle.html)
- Bundesamt für Statistik: [Sterblichkeit, Todesursachen](https://www.bfs.admin.ch/bfs/de/home/statistiken/gesundheit/gesundheitszustand/sterblichkeit-todesursachen.html)
- Bundesamt für Statistik: [Mortalitätsmonitoring (MOMO)](https://www.experimental.bfs.admin.ch/expstat/de/home/innovative-methoden/momo.html)
- Weltgesundheitsorganisation (WHO): [EUROMOMO](https://www.euromomo.eu/graphs-and-maps/)


### Todesfälle Schweiz (Sample)

Todesfälle nach Fünf-Jahres-Altersgruppe, Geschlecht, Woche und Kanton (CSV-Datei)

```{r data}
read_csv2('../data/todesfaelle_woche.csv') %>%
  top_n(10) %>%
  knitr::kable()
```

### Wöchentlicher Nachtrag (Sample)

```{r diff}
dfdiff <- read_csv2('../data/diff.csv')
DT::datatable(dfdiff[0:100,], class = 'cell-border stripe')
```

### Logdatei

```{r log}
mylog <- read_csv2('../data/log.csv', col_names = F) %>% purrr::map_df(rev)
knitr::kable(mylog[0:100,], col.names = c('Datum','Status','Text'))
```

### Zusätzliche Informationen

Metadatenzugriff [API (JSON)](https://norman-ds.github.io/momo/json.json) 

***

`r berestful()`